
#ifndef DRAGWIDGET_H
#define DRAGWIDGET_H

#include <BImage>
#include <BWidget>

using namespace BWE;


class DragWidget : public BWidget
{
	BOBJECT(DragWidget)
public:
	DragWidget(BWidget* parent = 0);
	~DragWidget();

protected:
	void proc(BObject* object, const BString& signal, const BValue& value);
	void procMoving(BObject* object, const BValue& value);

protected:
	virtual void paintEvent(const BEvent& event);

	virtual void mousePressEvent(const BMouseEvent& mouseEvent);
	virtual void mouseReleaseEvent(const BMouseEvent& mouseEvent);
	virtual void mouseMoveEvent(const BMouseEvent& mouseEvent);

private:
	BColor			_color;
	bool			_pressed;
	BPoint			_pressedPos;
	BImageHolder 	_image0;
	BImageHolder 	_image1;
};

#endif
